// Visitor.h

#ifndef __VISITOR_H__
#define __VISITOR_H__

class ConcreteElementA;
class ConcreteElementB;

class Element;

class Visitor
{
public:
	virtual ~Visitor();
	virtual void VisitConcreteElementA(Element *elm) = 0;
	virtual void VisitConcreteElementB(Element *elm) = 0;

protected:
	Visitor();
};

class ConcreteVisitorA : public Visitor
{
public:
	ConcreteVisitorA();
	virtual ~ConcreteVisitorA();
	virtual void VisitConcreteElementA(Element *elm);
	virtual void VisitConcreteElementB(Element *elm);
};

class ConcreteVisitorB : public Visitor
{
public:
	ConcreteVisitorB();
	virtual ~ConcreteVisitorB();
	virtual void VisitConcreteElementA(Element *elm);
	virtual void VisitConcreteElementB(Element *elm);
};

#endif